
package com.jiuqi.ccp.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for ccpGfsConfig.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="ccpGfsConfigForm"
 */
public class CcpGfsConfigForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _cgcGuid = null;
   private java.lang.String _cgcName = null;
   private java.lang.String _cgcCode = null;
   private java.lang.String _dirName = null;
   private java.lang.String _dirPath = null;
   private java.lang.String _parentGuid = null;
   private java.lang.String _remark = null;
   private java.lang.String _configType = null;
   private java.lang.String _reserved1 = null;
   private java.lang.String _reserved2 = null;
   private java.lang.String _reserved3 = null;
   private java.lang.String _reserved4 = null;
   private java.lang.String _reserved5 = null;

   /**
    * Standard constructor.
    */
   public CcpGfsConfigForm() {
   }

   /**
    * Returns the cgcGuid
    *
    * @return the cgcGuid
    */
   public java.lang.String getCgcGuid() {
      return _cgcGuid;
   }

   /**
    * Sets the cgcGuid
    *
    * @param cgcGuid the new cgcGuid value
    */
   public void setCgcGuid(java.lang.String cgcGuid) {
      _cgcGuid = cgcGuid;
   }
   /**
    * Returns the cgcName
    *
    * @return the cgcName
    */
   public java.lang.String getCgcName() {
      return _cgcName;
   }

   /**
    * Sets the cgcName
    *
    * @param cgcName the new cgcName value
    */
   public void setCgcName(java.lang.String cgcName) {
      _cgcName = cgcName;
   }
   /**
    * Returns the cgcCode
    *
    * @return the cgcCode
    */
   public java.lang.String getCgcCode() {
      return _cgcCode;
   }

   /**
    * Sets the cgcCode
    *
    * @param cgcCode the new cgcCode value
    */
   public void setCgcCode(java.lang.String cgcCode) {
      _cgcCode = cgcCode;
   }
   /**
    * Returns the dirName
    *
    * @return the dirName
    */
   public java.lang.String getDirName() {
      return _dirName;
   }

   /**
    * Sets the dirName
    *
    * @param dirName the new dirName value
    */
   public void setDirName(java.lang.String dirName) {
      _dirName = dirName;
   }
   /**
    * Returns the dirPath
    *
    * @return the dirPath
    */
   public java.lang.String getDirPath() {
      return _dirPath;
   }

   /**
    * Sets the dirPath
    *
    * @param dirPath the new dirPath value
    */
   public void setDirPath(java.lang.String dirPath) {
      _dirPath = dirPath;
   }
   /**
    * Returns the parentGuid
    *
    * @return the parentGuid
    */
   public java.lang.String getParentGuid() {
      return _parentGuid;
   }

   /**
    * Sets the parentGuid
    *
    * @param parentGuid the new parentGuid value
    */
   public void setParentGuid(java.lang.String parentGuid) {
      _parentGuid = parentGuid;
   }
   /**
    * Returns the remark
    *
    * @return the remark
    */
   public java.lang.String getRemark() {
      return _remark;
   }

   /**
    * Sets the remark
    *
    * @param remark the new remark value
    */
   public void setRemark(java.lang.String remark) {
      _remark = remark;
   }
   /**
    * Returns the configType
    *
    * @return the configType
    */
   public java.lang.String getConfigType() {
      return _configType;
   }

   /**
    * Sets the configType
    *
    * @param configType the new configType value
    */
   public void setConfigType(java.lang.String configType) {
      _configType = configType;
   }
   /**
    * Returns the reserved1
    *
    * @return the reserved1
    */
   public java.lang.String getReserved1() {
      return _reserved1;
   }

   /**
    * Sets the reserved1
    *
    * @param reserved1 the new reserved1 value
    */
   public void setReserved1(java.lang.String reserved1) {
      _reserved1 = reserved1;
   }
   /**
    * Returns the reserved2
    *
    * @return the reserved2
    */
   public java.lang.String getReserved2() {
      return _reserved2;
   }

   /**
    * Sets the reserved2
    *
    * @param reserved2 the new reserved2 value
    */
   public void setReserved2(java.lang.String reserved2) {
      _reserved2 = reserved2;
   }
   /**
    * Returns the reserved3
    *
    * @return the reserved3
    */
   public java.lang.String getReserved3() {
      return _reserved3;
   }

   /**
    * Sets the reserved3
    *
    * @param reserved3 the new reserved3 value
    */
   public void setReserved3(java.lang.String reserved3) {
      _reserved3 = reserved3;
   }
   /**
    * Returns the reserved4
    *
    * @return the reserved4
    */
   public java.lang.String getReserved4() {
      return _reserved4;
   }

   /**
    * Sets the reserved4
    *
    * @param reserved4 the new reserved4 value
    */
   public void setReserved4(java.lang.String reserved4) {
      _reserved4 = reserved4;
   }
   /**
    * Returns the reserved5
    *
    * @return the reserved5
    */
   public java.lang.String getReserved5() {
      return _reserved5;
   }

   /**
    * Sets the reserved5
    *
    * @param reserved5 the new reserved5 value
    */
   public void setReserved5(java.lang.String reserved5) {
      _reserved5 = reserved5;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getCgcGuid() == null) {
         errors.add("cgcGuid", new ActionError("error.cgcGuid.required"));
      }
      // TODO test format/data
      return errors;
   }
}
